package ee.action;

import com.opensymphony.xwork2.ActionSupport;
import ee.db.UserService;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import org.springframework.beans.factory.annotation.Autowired;

public class Index extends ActionSupport implements com.opensymphony.xwork2.Action{
  private UserService userService;

  @Override
  public String execute() {
    userService = new UserService();
    System.out.println("execution");
    return "success";
  }


  @Action(value = "register", results = {
    @Result(name = "success", location = "index.jsp")
  })
  public String register() {
    return "success";
  }
}
